USE [xRepair]
GO

/****** Object:  StoredProcedure [dbo].[UpdateModel]    Script Date: 2/23/2014 12:22:31 AM ******/
DROP PROCEDURE [dbo].[UpdateModel]
GO

/****** Object:  StoredProcedure [dbo].[UpdateModel]    Script Date: 2/23/2014 12:22:31 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[UpdateModel]
		@ID						INT
		,@BrandID				INT	
		,@ModelName				NVARCHAR(200)	
		,@Version				NVARCHAR(50)
		,@Manufacturer			NVARCHAR(500)
		,@LastUpdatedAt			DATETIME = NULL
		,@LastUpdatedBy			NVARCHAR(50) = NULL
		,@Rowcount				INT = -1 OUTPUT
AS
BEGIN

	SET NOCOUNT ON;

	UPDATE [dbo].[Model]
	SET [BrandID]		 =	@BrandID
		,[ModelName]	 =	@ModelName
		,[Version]		 =	@Version
		,[Manufacturer]	 =	@Manufacturer		
		,[LastUpdatedAt] =	@LastUpdatedAt
		,[LastUpdatedBy] =	@LastUpdatedBy
	WHERE [ID] = @ID

    SELECT @Rowcount = @@ROWCOUNT
END



GO


